//
//  ScheduleViewController.m
//  Conferences
//
//  Created by Mason Mei on 5/13/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "ScheduleViewController.h"
#import "CalendarView.h"

@interface ScheduleViewController ()

@end

@implementation ScheduleViewController
@synthesize tabBar = _tabBar;
@synthesize calendarScrollView = _calendarScrollView;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    
//    UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"tmp.png"]];
//    
//    NSLog(@"Calendar Scroll View %@", self.calendarScrollView);
//    self.calendarScrollView.contentSize = imageView.frame.size;
//    [self.calendarScrollView setDirectionalLockEnabled:YES];
//    [self.calendarScrollView addSubview:imageView];
    CalendarView *calView = [[CalendarView alloc] initWithContent:nil];
    calView.backgroundColor = [UIColor redColor];
    self.calendarScrollView.contentSize = calView.frame.size;
    [self.calendarScrollView setDirectionalLockEnabled:YES];
    [self.calendarScrollView setDirectionalLockEnabled:true];
    [self.calendarScrollView addSubview:calView];
}

- (void)viewDidUnload
{
    [self setTabBar:nil];
    [self setCalendarScrollView:nil];
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
